/*
 * <one line to give the program's name and a brief idea of what it does.>
 * Copyright (C) 2019
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include "shipdrone.hpp"
#include "datatable.hpp"

ShipDrone::ShipDrone(const droneType type, const uint8_t level) : m_Type(type) {
	m_Level = level < drone ? level : drone - 1;

	switch(m_Type) {
		case droneType::CONTROLLER:
			// ignore this type of drone
			break;

		case droneType::DEAD:
			m_Value = DataTable::droneStats[m_Level][0];
			break;

		case droneType::LEECH:
			m_Value = DataTable::droneStats[m_Level][1];
			break;

		case droneType::REFLECTOR:
			m_Value = DataTable::droneStats[m_Level][2];
			break;

		case droneType::REGEN:
			m_Value = DataTable::droneStats[m_Level][3];
			break;

		case droneType::SHIELD_ABSORBTION:
			m_Value = DataTable::droneStats[m_Level][4];
			break;

		case droneType::SHIELD_PENETRATION:
			m_Value = DataTable::droneStats[m_Level][5];
			break;
	}
}
